home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Tools & Apps / Misc. Utilities / Installer 3.4 / Examples - Installer 3.4 / SimpleCustomOnly.r < prev    next >
Encoding:
Text File  |  1992-09-21  |  4.2 KB  |  109 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  *
  3.  *    Apple Macintosh Developer Technical Support
  4.  *
  5.  *  Installer 3.2 sample: very simple installation (Custom Installation only)
  6.  *
  7.  *    File:        SimpleCustomOnly.r -    Rez Source
  8.  *
  9.  *    by:            Jon Zap
  10.  *  updated for use with Installer 3.4 by: Rich Kubota 9/1/92
  11.  *
  12.  *    Copyright © 1991 Apple Computer, Inc.
  13.  *    All rights reserved.
  14.  *
  15.  *------------------------------------------------------------------------------
  16.  *
  17.  * Install application "TheProgram" into the folder "Root":Installed Application
  18.  * It demonstrates only Custom Installation (Easy Installation is not supported)
  19.  * Note: we are not recommending that you do a custom only installation; it is
  20.  * here to show what is needed for custom installation.  (The key point is that
  21.  * frameworks and rules do not apply)
  22.  *----------------------------------------------------------------------------*/
  23.  
  24. #include "InstallerTypes.r"
  25.  
  26. /* You can build and complete the script with the following lines:
  27. # Note: set up floppies with the appropriate names and contents before running scriptcheck
  28. # or set up folders with the same names and contents as the floppies
  29. # put these folders in the same folder as the script or at the root directory of same disk
  30.  
  31.     rez -o "SimpleCustomOnly" -t 'bbkr' -c 'bbkr' "SimpleCustomOnly.r"
  32.     setfile -a i "SimpleCustomOnly"        #mark Inited
  33.     scriptcheck -p "SimpleCustomOnly"
  34. */
  35.  
  36. /* put a 1 in the creation date field of source 'infs' to have ScriptCheck set date */
  37. #define kScriptCheckSetsDate    0x01
  38.  
  39. /* Defines for the file spec atoms (specifications for source and destination files) */
  40. #define fsSourceProgram            2000
  41. #define fsTargetProgram            2001
  42.  
  43. /* This is the name of the source disk */
  44. #define ProgramDisk "Program Disk:"
  45.  
  46. /* This is the target path for where we want to install the file. */
  47. #define TargetPath    ":Installed Application:"
  48.  
  49. /* Definition for the package. */
  50. #define pkTheProgram            3000
  51.  
  52. /* Definition for the file atom */
  53. #define faProgram                4000
  54.  
  55. /***************************** Package Resources ************************************************/
  56. resource 'inpk' (pkTheProgram) {
  57.     format0 {
  58.         showsOnCustom,             /* Package appears in the Custom Install display */
  59.         removable,                /* Package can be removed */
  60.         dontForceRestart,        /* installing an app doesnt require rebooting */
  61.         0,                         /* 'icmt' not required */
  62.         0,                        /* Package size (filled in by ScriptCheck) */
  63.         "The Program", {        /* package name */
  64.             'infa', faProgram;
  65.         }
  66.     }
  67. };
  68.  
  69. /********************************************* File Specs ***************************************/
  70. /* Source File Specs */
  71. resource 'infs' (fsSourceProgram) {
  72.     'APPL',                                /* File Type */
  73.     'ttxt',                                /* Creator */
  74.     kScriptCheckSetsDate,                /* ScriptCheck will fill in the creation date */
  75.     noSearchForFile,                    /* Do not search the source disk for the file */
  76.     typeCrMustMatch,                    /* file type and creator on this file must match */
  77.     ProgramDisk"TeachText"                /* Path to the file */
  78. };
  79.  
  80. /* Target File Specs */
  81. resource 'infs' (fsTargetProgram) {
  82.     'APPL',                                /* File Type */
  83.     'ttxt',                                /* Creator */
  84.     0,                                    /* not needed for target file spec */
  85.     noSearchForFile,                    /* Do not search the target disk for the file */
  86.     typeCrMustMatch,                    /* not needed for target file specs */
  87.     TargetPath"TeachText"                /* installation Path */
  88. };
  89.  
  90. /******************************************** File Atoms ************************************************/
  91. resource 'infa' (faProgram) {
  92.     format0 {
  93.         deleteWhenRemoving,                /* Delete the file if remove (option-custom) is clicked    */
  94.         dontDeleteWhenInstalling,         /* don't need to predelete the target before copying new one */
  95.         copy,                             /* Copy the file to the destination */
  96.         leaveAloneIfNewer,                 /* do not Install this version, if newer one exists */
  97.         updateExisting,                 /* replace an existing copy, if mine is newer */
  98.         copyIfNewOrUpdate,                /* Copy whether the target file exists or not */
  99.         rsrcFork, dataFork,                /* Copy both forks of the file */
  100.         fsTargetProgram,                /* TARGET file spec */
  101.         fsSourceProgram,                 /* SOURCE file spec */
  102.         0,                                /* atom size (filled in by ScriptCheck) */
  103.         ""                                /* Atom Description (for a file Installer will use file name) */
  104.     };
  105. };
  106.  
  107.  
  108.  
  109.